-- GENERATED SPELL FOR [Flamescale Broodling] --


function spell0_7049(pUnit, Event) --@Create Broodling Essence,n/a--
if charge_disp ~= 'na' then
pUnit:FullCastSpellOnTarget(16027,pUnit:GetMainTank ())
local charge_disp = 'na'
end
pUnit:RegisterEvent('Sorts_7049', 1, 1)
end

function spell1_7049(pUnit, Event) --@Fire Blast,n/a--
pUnit:FullCastSpellOnTarget(13342,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_7049', 658, 1)
end

function spell2_7049(pUnit, Event) --@Fireball,n/a--
pUnit:FullCastSpellOnTarget(13375,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_7049', 3000, 1)
end

function Sorts_7049(pUnit, Event)
local choix_sorts_7049 = math.random(0, 2)
if choix_sorts_7049 == 0 then
pUnit:RegisterEvent('spell0_7049', 1, 1)
end
if choix_sorts_7049 == 1 then
pUnit:RegisterEvent('spell1_7049', 1, 1)
end
if choix_sorts_7049 == 2 then
pUnit:RegisterEvent('spell2_7049', 1, 1)
end
end

function mob7049_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_7049', math.random(1500, 3000), 1)
end

function mob7049_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob7049_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob7049_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(7049, 1, 'mob7049_Action')
RegisterUnitEvent(7049, 2, 'mob7049_Leave')
RegisterUnitEvent(7049, 3, 'mob7049_Kill')
RegisterUnitEvent(7049, 4, 'mob7049_Die')
